#ifndef _BSP_FMC_H
#define _BSP_FMC_H

#define DATA_FLASH_TEST_BASE        0x3D800    //256-10K

#define DATA_FLASH_TEST_BASE_2      (DATA_FLASH_TEST_BASE+FMC_FLASH_PAGE_SIZE)    //256-8K
#define DATA_FLASH_TEST_BASE_3      (DATA_FLASH_TEST_BASE+FMC_FLASH_PAGE_SIZE*2)    //256-6K

//int32_t  FlashTest(uint32_t u32StartAddr, uint32_t u32EndAddr, uint32_t u32Pattern);

extern void FMC_Write(uint32_t u32Addr, uint32_t u32Data);
extern uint32_t FMC_Read(uint32_t u32Addr);
extern int32_t FMC_Erase(uint32_t u32Addr);

u8 FMC_WriteData(u8* pBuffer,u32 WriteAddr,u16 NumByteToWrite);
u8 FMC_ReadData(u8* pBuffer,u32 ReadAddr,u16 NumByteToRead);

//u8 FMC_WriteData1(u8* pBuffer,u32 WriteAddr,u16 NumByteToWrite);
//u8 FMC_ReadData1(u8* pBuffer,u32 ReadAddr,u16 NumByteToRead);

u8 SaveSystemInfo(void);

u8 bsp_InitFMC(void);
#endif

